/**
 * Author: Sam
 * Description: General data class to describe all 
 * types of food/drink that can be add to Order.
 */
package GoldenEagle;

public class MenuSubject {
	private float fPrice; 
	public enum FoodType {Drink, Meal};
	
	private FoodType foodType;
	private String strName;
	private float fDiscount;
	private String strOption;
	public MenuSubject(String name,FoodType type,float price)
	{
		strName = name.toString();
		foodType = type;
		fPrice = price;
		
	}
	
	//copy the information, not pass the references
	public MenuSubject getCopy()
	{
		MenuSubject ms = new MenuSubject(strName,foodType,fPrice);
		ms.fDiscount = this.fDiscount;
		ms.strOption = this.strOption;
		
		return ms;
	}

	//price and foodtype should predefinded and not be set in runtime
	//public void setPrice(float d)		{	if(d >= 0)				fPrice = d;	}
	public void setDiscount(float d)	{	if(d >= 0 && d <= 1)	fDiscount = d;	}
	//public void setFoodType(FoodType ft){	foodType = ft;	}
	public void setOption(String option){	strOption = option;		}
	
	public float getPrice(){return fPrice;}
	public float getDiscount(){return fDiscount;}
	public FoodType getFoodType(){return foodType;}
	public String getOption(){return strOption;}
	public String getName(){return strName;}
	
	public String toString()
	{
		return "Name: " + strName + "   Food Type: " + foodType + "   Price: $" + fPrice;
	}

}



